package com.apiit.webserviceclient.activities;

import com.apiit.webserviceclient.R;
import com.apiit.webserviceclient.R.layout;
import com.apiit.webserviceclient.R.menu;

import android.os.Bundle;
import android.app.Activity;
import android.content.Intent;
import android.view.Menu;
import android.widget.TextView;

public class DisplayCourses extends Activity {
	
	TextView course1;
	TextView course2;
	TextView course3;
	TextView course4;
	TextView course5;
	TextView course6;
	TextView course7;
	TextView course8;
	TextView course9;
	TextView course10;
	TextView course11;
	TextView course12;
	TextView course13;
	TextView course14;
	TextView course15;
	TextView course16;
	TextView course17;
	TextView course18;
	TextView course19;
	TextView course20;
	TextView course21;
	TextView course22;
	TextView course23;
	TextView course24;
	TextView course25;
	TextView course26;
	TextView course27;
	TextView course28;
	TextView course29;
	TextView course30;
	TextView course31;
	TextView course32;
	TextView course33;
	TextView course34;
	TextView course35;
	TextView course36;
	TextView course37;
	TextView course38;
	TextView course39;
	TextView course40;
	TextView course41;
	TextView course42;
	TextView course43;
	TextView course44;
	TextView course45;
	TextView course46;
	TextView course47;
	TextView course48;
	TextView course49;
	TextView course50;


	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_display_courses);
		
		course1 = (TextView) findViewById(R.id.txtcourese1);
		course2 = (TextView) findViewById(R.id.txtcourese2);
		course3 = (TextView) findViewById(R.id.txtcourese3);
		course4 = (TextView) findViewById(R.id.txtcourese4);
		course5 = (TextView) findViewById(R.id.txtcourese5);
		course6 = (TextView) findViewById(R.id.txtcourese6);
		course7 = (TextView) findViewById(R.id.txtcourese7);
		course8 = (TextView) findViewById(R.id.txtcourese8);
		course9 = (TextView) findViewById(R.id.txtcourese9);
		course10 = (TextView) findViewById(R.id.txtcourese10);
		course11 = (TextView) findViewById(R.id.txtcourese11);
		course12 = (TextView) findViewById(R.id.txtcourese12);
		course13 = (TextView) findViewById(R.id.txtcourese13);
		course14 = (TextView) findViewById(R.id.txtcourese14);
		course15 = (TextView) findViewById(R.id.txtcourese15);
		course16 = (TextView) findViewById(R.id.txtcourese16);
		course17 = (TextView) findViewById(R.id.txtcourese17);
		course18 = (TextView) findViewById(R.id.txtcourese18);
		course19 = (TextView) findViewById(R.id.txtcourese19);
		course20 = (TextView) findViewById(R.id.txtcourese20);
		course21 = (TextView) findViewById(R.id.txtcourese21);
		course22 = (TextView) findViewById(R.id.txtcourese22);
		course23 = (TextView) findViewById(R.id.txtcourese23);
		course24 = (TextView) findViewById(R.id.txtcourese24);
		course25 = (TextView) findViewById(R.id.txtcourese25);
		course26 = (TextView) findViewById(R.id.txtcourese26);
		course27 = (TextView) findViewById(R.id.txtcourese27);
		course28 = (TextView) findViewById(R.id.txtcourese28);
		course29 = (TextView) findViewById(R.id.txtcourese29);
		course30 = (TextView) findViewById(R.id.txtcourese30);
		course31 = (TextView) findViewById(R.id.txtcourese31);
		course32 = (TextView) findViewById(R.id.txtcourese32);
		course33 = (TextView) findViewById(R.id.txtcourese33);
		course34 = (TextView) findViewById(R.id.txtcourese34);
		course35 = (TextView) findViewById(R.id.txtcourese35);
		course36 = (TextView) findViewById(R.id.txtcourese36);
		course37 = (TextView) findViewById(R.id.txtcourese37);
		course38 = (TextView) findViewById(R.id.txtcourese38);
		course39 = (TextView) findViewById(R.id.txtcourese39);
		course40 = (TextView) findViewById(R.id.txtcourese40);
		course41 = (TextView) findViewById(R.id.txtcourese41);
		course42 = (TextView) findViewById(R.id.txtcourese42);
		course43 = (TextView) findViewById(R.id.txtcourese43);
		course44 = (TextView) findViewById(R.id.txtcourese44);
		course45 = (TextView) findViewById(R.id.txtcourese45);
		course46 = (TextView) findViewById(R.id.txtcourese46);
		course47 = (TextView) findViewById(R.id.txtcourese47);
		course48 = (TextView) findViewById(R.id.txtcourese48);
		course49 = (TextView) findViewById(R.id.txtcourese49);
		course50 = (TextView) findViewById(R.id.txtcourese50);
		
		Intent intename = getIntent();
		String courseval1 = intename.getStringExtra("course1").replaceAll(" &amp;", "and");
		String courseval2 = intename.getStringExtra("course2").replaceAll(" &amp;", "and");
		String courseval3 = intename.getStringExtra("course3").replaceAll(" &amp;", "and");
		String courseval4 = intename.getStringExtra("course4").replaceAll(" &amp;", "and");
		String courseval5 = intename.getStringExtra("course5").replaceAll(" &amp;", "and");
		String courseval6 = intename.getStringExtra("course6").replaceAll(" &amp;", "and");
		String courseval7 = intename.getStringExtra("course7").replaceAll(" &amp;", "and");
		String courseval8 = intename.getStringExtra("course8").replaceAll(" &amp;", "and");
		String courseval9 = intename.getStringExtra("course9").replaceAll(" &amp;", "and");
		
		course1.setText(courseval1);
		course2.setText(courseval2);
		course3.setText(courseval3);
		course4.setText(courseval4);
		course5.setText(courseval5);
		course6.setText(courseval6);
		course7.setText(courseval7);
		course8.setText(courseval8);
		course9.setText(courseval9);
		
				
	}

	@Override
	public boolean onCreateOptionsMenu(Menu menu) {
		// Inflate the menu; this adds items to the action bar if it is present.
		getMenuInflater().inflate(R.menu.display_courses, menu);
		return true;
		
	}

}
